<template>
  <div class="file_cell">
    <file-icon :fileName="dataProp"></file-icon>
    {{dataProp}}
  </div>
</template>

<script>
import FileIcon from '../FileIcon'

export default {
  name: 'FileCell',
  props: {
    column: {
      type: Object,
      default() {
        return {}
      }
    },
    data: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  components: {
    FileIcon
  },
  computed: {
    dataProp() {
      return this.data[this.column.prop] || ''
    }
  }
}
</script>

<style scoped>
  .file_cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
</style>
